<!DOCTYPE html>
<html lang="en">
<!-- cesium 绘制 Corridor  -->

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport"
    content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
  <title>Hello World!</title>
  <script src="./Build/CesiumUnminified/Cesium.js"></script>
  <style>
    @import url(./Build/CesiumUnminified//Widgets/widgets.css);

    html,
    body,
    #cesiumContainer {
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      overflow: hidden;
    }
  </style>
</head>

<body>
  <div id="cesiumContainer"></div>
  <script>
    Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmNWY1NTNiZC0yOWZjLTQxYTEtYmFmZS0zZDhhOWRmMmMyM2YiLCJpZCI6MTM2MDIyLCJpYXQiOjE2ODI2NzE3NjR9.iCrukqqU__ODBrOwYgkTzv2fyg_yAli8GyePHhjgiFc';
    
    const viewer = new Cesium.Viewer("cesiumContainer", {
      baseLayerPicker: true,//是否显示图层选择器 
    })
    //
    viewer.entities.add({
      corridor: {
        positions: Cesium.Cartesian3.fromDegreesArray([
          // 104.303854,24.871046, 0.0
          /* 
          114.3, 30.5,
          114.3, 30.52,
          114.32, 30.52,
          114.32, 30.5, */
          104.303854, 24.871046,
          104.303854, 24.891046,
          104.323954, 24.891046,
          104.323954, 24.871046,
        ]),
        width: 100,
        material: Cesium.Color.RED.withAlpha(0.5),
        outline: true,
        outlineColor: Cesium.Color.BLACK,
      }
    })
    viewer.zoomTo(viewer.entities)
  </script>
</body>

</html>